<!DOCTYPE html>
{{>head}}
<body>
    {{>navbar}}
    <div class="container" style="margin-top: 40px;">
        <h1>Test Page</h1>
        <script src="/static/js/type_schema.js"></script>
        <script>
            function test() {
                let ts = document.getElementById('ts').value;
                let result = tsvalidate(ts);
                document.getElementById('result').innerHTML = result;
            }

            document.addEventListener('DOMContentLoaded', function() {
                const inputField = document.getElementById('ts');
                inputField.addEventListener('input', test);
            });
        </script>
        <input type="text" id="ts" placeholder="Type Schema">
        <p> 结果： </p>
        <p id="result"></p>
    </div>
    {{> footer}}
</body>
